package model.components;

//import gui.Icons;

/**
 * RequestRouter Class. Subclass of Node.
 */
public class RequestRouter extends Node {
	
	private SubstrateRouter physicalRouter;
	
	public RequestRouter(int id) {
		super(id);
		name = "requestRouter"+id;
		/*setIcon(Icons.ROUTER);
		setSmallIcon(Icons.ROUTER_SMALL);
		setPickedIcon(Icons.ROUTER_PICKED);
		setYellowIcon(Icons.ROUTER_YELLOW);
		setRedIcon(Icons.ROUTER_RED);*/
		physicalRouter = null;
	}

	public SubstrateRouter getPhysicalRouter() {
		return physicalRouter;
	}

	public void setPhysicalRouter(SubstrateRouter physicalRouter) {
		this.physicalRouter = physicalRouter;
	}
	
	public Object getCopy() {
		RequestRouter r = new RequestRouter(this.getId());
		r.name = this.name;
		r.cpu = this.cpu;
		r.memory = this.memory;
		r.vlans = this.vlans;
		r.so = this.so;
		r.netStack = this.netStack;
		r.location = this.location;
//		for (Interface i : this.interfaces)
//			r.interfaces.add((Interface) i.getCopy());
//		if (this.physicalRouter!=null)
//			r.physicalRouter = (SubstrateRouter) this.physicalRouter.getCopy();
		return r;
	}
	
}
